package com.kurt.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 用户扩展表
 * 存储用户的额外信息，如邮箱、头像、性别、生日、地址、职位、工号等
 * 与sys_user表一对一关联
 */
@Data
@Entity
@Table(name = "sys_user_extension")
@EqualsAndHashCode(callSuper = true)
public class SysUserExtension extends BaseEntity {

    @Id
    @Column(name = "id")
    private Long id; // 用户ID，与sys_user.id一致

    @Column(name = "email", length = 100)
    private String email; // 邮箱

    @Column(name = "avatar", length = 255)
    private String avatar; // 头像URL

    @Column(name = "gender")
    private Integer gender; // 性别(0-未知,1-男,2-女)

    @Column(name = "birthday")
    private LocalDate birthday; // 生日

    @Column(name = "address", length = 255)
    private String address; // 地址

    @Column(name = "position", length = 50)
    private String position; // 职位

    @Column(name = "employee_no", length = 50)
    private String employeeNo; // 工号

    @Column(name = "custom_field1", length = 255)
    private String customField1; // 自定义字段1

    @Column(name = "custom_field2", length = 255)
    private String customField2; // 自定义字段2

    @Column(name = "custom_field3", length = 255)
    private String customField3; // 自定义字段3

}
